#include "base.h"

class Solution
{
public:
    void moveZeroes(vector<int> &nums)
    {
        int sl = 0, fa = 0;

        while (fa < nums.size())
        {
            if (nums[fa] != 0)
            {
                // nums[sl]=nums[fa];
                swap(nums[sl], nums[fa]);
                sl++;
            }
            fa++;
        }
    }
};